package com.wkbb.common.enums;

public enum ChangeClassOperateTypeEnum {

    //操作类型
    CHANGE_CLASS_TO_STUDENT_PERSON(1,"学生调班"),
    CHANGE_CLASS_TO_STUDENT_GRADUATE(2,"毕业"),
    CHANGE_CLASS_TO_STUDENT_UNIVERSITY(3,"肄业"),
    CHANGE_CLASS_TO_UP_CLASS(4,"升班");

    private Integer code;

    private String desc;

    ChangeClassOperateTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    // 普通方法
    public static String getDesc(short code) {
        for (ChangeClassOperateTypeEnum c : ChangeClassOperateTypeEnum.values()) {
            if (c.getCode() == code) {
                return c.desc;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
